package cn.tedu.weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 注册功能DTO类
 */
//@AllArgsConstructor
//@NoArgsConstructor
@Data
public class UserRegDTO {
    //依据API文档,属性有 用户名,密码,昵称
    /*
        ApiModelProperty注解:Knife4j注解,添加在类属性上,用于控制文档中参数的描述信息;
           value参数:指定参数描述;
           required参数:指定是否为必填项;
           example参数:指定示例值;
     */
    //@NotNull(message = "用户名不能为null")
    //@NotEmpty(message = "用户名不能为空,同时不能为null")
    @NotBlank(message = "用户名不能为空,同时不能为null,同时不能为空白")
    @Size(min = 6, max = 12, message = "用户名必须在6-12位之间")
    @ApiModelProperty(value = "用户名", required = true, example = "Lucy")
    private String username;
    @ApiModelProperty(value = "密码", required = true, example = "871016")
    private String password;
    @ApiModelProperty(value = "昵称", required = true, example = "lucy")
    private String nickname;
}





